/*------------------------------------------------用户注册模块*/
/*注册窗口整体设置*/
.register {
    width: 360px;
    background-color: #fff;
    margin: 80px auto;
    border-radius: 10px;
    color: #000;
    padding: 40px ;
}

/*注册标题设置*/
.register .register-title {
    font-size: 25px;
    text-align: center;
    margin-bottom: 30px;
}

/*上传头像部分*/
.avatar-upload {
    /*background-color: gainsboro;*/
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/*头像图片显示*/
.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid gainsboro;
    background-color: #ffffff;
    overflow: hidden;
    vertical-align: middle;
}
.avatar-preview img {
    width: 100%;
    height: 100%;
/*    图片保持宽高比例，填充满整个框*/
    object-fit: cover;
}

/*上传头像文字设置*/
.upload-label {
    margin-top: 7px;
    color: #21A053;
    text-decoration: underline;
}
#avatar-input {
    display: none;
}

/*标签文字设置*/
.register-form label {
    display: block;
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 10px;
}
/*输入框设置*/
.register-form input {
    width: 100%;
    border: 1px solid gainsboro;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
}
.register-form input:focus {
    border: 2px solid #21A053;
}

/*注册按键*/
.register-btn {
    width: 100%;
    background-color: #21A053;
    border: 0px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 18px;
    color: #ffffff;
    font-weight: bold;
}

/*最下方文字设计*/
.register-footer {
    color: darkgray;
    font-size: 14px;
    font-weight: normal;
}
.register-footer a {
    color: #21A053;
    text-decoration: underline;
}


/*-----------------------------------------------------------------用户登录模块*/
/*登录整体窗口*/
.login {
    width: 360px;
    background-color: #ffffff;
    margin: 100px auto;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

/*登录标题设置*/
.login-title {
    /*text-align: center;*/
    margin-bottom: 30px;
    font-size: 20px;
}

/*登录输入框设置*/
.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid gainsboro;
    border-radius: 10px;
}

/*登录按键设置*/
.login-form .login-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 13px;
    border: 0px;
    background-color: #21A053;
    color: #ffffff;
    font-size: 16px;
}

/*登录底部文字设置*/
.login-footer {
    color: darkgray;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: normal;
}
.login-footer a {
    color: #21A053;
    text-decoration: underline;
}
/*错误的提示信息*/
.error {
    color: red;
    margin-bottom: 20px;
    font-size: 12px;
}

/*-------------------------------------------------------------发布商品模块*/
.publish-form {
    padding: 30px;
}
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    margin-right: 35px;
}
.form-group input[type="text"],
.form-group textarea,
.form-group select,
.form-group input[type="number"] {
    width: 700px;
    padding: 10px;
    border: 1px solid gainsboro;
    border-radius: 5px;
}
.form-group input[type="radio"]:nth-of-type(2) {
    margin-left: 20px;
}
.goods-publish-btn {
    width: 810px;
    padding: 9px;
    background-color: #21A053;
    color: #ffffff;
    border: 0px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
}
/*错误的提示信息*/
.publish-form .error {
    padding-left: 120px;
    margin-top: 5px;
}
#imageError {
    padding-left: 150px;
}

/*上传图片实现预览和删除功能*/
/*外层大盒子*/
.image-uploader {
    margin-left: 120px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
/*每一个小盒子共三个小盒子*/
.images-preview-group {
    position: relative;
    width: 150px;
    height: 150px;
    border: 2px dashed #dddddd;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-items: center;
    /*过渡效果*/
    transition: all 0.3s ease;
}
.images-preview-group:hover {
    border-color: #21A053;
    background-color: #fff;
}

/*存放图片的小盒子*/
.images-preview {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/*盒子中的标签加号*/
.plus-icon {
    font-size: 100px;
    color: gainsboro;
    transition: color 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}
.images-preview span:hover {
    color: #21A053;
}
.images-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.delete-Btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 25px;
    height: 25px;
    background-color: #ee6363;
    color: white;
    border: 0px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
/*    让×位于正中间*/
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.images-preview-group:hover .delete-Btn {
    opacity: 1;
}

/*输入框的设置*/
.images-preview-group input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}


/*图片提示信息*/
.prompt-message {
    font-size: 13px;
    color: darkgrey;
    /*display: block;*/
}

/*商品发布成功提示信息*/
.publish-success {
    width: 815px;
    padding: 9px;
    background-color: rgba(33, 160, 83, 0.8);
    color: #F5D95B;
    margin-top: 20px;
    margin-left: 30px;
    border-radius: 10px;
}


/*---------------------------------------------------------------------------------个人中心界面*/
.user-center {
    width: 645px;
    /*background-color: palegoldenrod;*/
    margin: auto;
    padding: 20px;
}
/*个人中心大标题*/
.center-title {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 35px;
    color: #14854D;
}
.user-center form {
    margin-bottom: 30px;
    vertical-align: baseline;
}
.user-center-form-group {
    margin-bottom: 20px;
}

/*表单中的小标题设置*/
.user-center h3 {
    margin-bottom: 20px;
}

/*所有标签设置*/
.user-center label {
    margin-right: 40px;
    font-weight: normal;
    font-size: 16px;
    color: darkgrey;
}
.account-security-form label {
    margin-right: 24px;
}

/*所有输入框设置*/
.user-center input[type="text"],
.user-center input[type="password"],
.user-center input[type="tel"]{
    width: 500px;
    padding: 10px;
    border: 1px solid gainsboro;
    border-radius: 5px;
}
/*个人资料中对齐所有输入框*/
#change-nickname {
    margin-left: 16px;
}
/*账号安全中对齐所有输入框*/
#new-password,#original-password {
    margin-left: 16px;
}
/*提交按键设置*/
.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.saveChangesBtn {
    width: 130px;
    padding: 10px;
    border: 0px;
    border-radius: 5px;
    background-color: #14854D;
    color: #ffffff;
    font-weight: bold;
}
.saveChangesBtn:hover {
    color: #F5D95B;
}

/*头像部分*/
.change-avatar-preview {
    display: inline-block;
    width: 80px;
    height: 80px;
    overflow: hidden;
    vertical-align: middle;
}
#change-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.personal-information-form .user-center-form-group:nth-of-type(1) label {
    margin-right: 60px;
}


/*---------------------------------------------------------------------------商品列表页*/
/*回到顶部*/
#backToTop {
    display:none;
    position:fixed;
    right:30px;
    bottom:50px;
    z-index:99;
    background-color: #21A053;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s;
}
#backToTop:hover {
    opacity: 1;
}
/*商品列表*/
.goods_list {
    display: flex;
    margin-top: 30px;
}
/*-----------------左侧边栏商品类别*/
.sidebar {
    position: relative;
    left: 5px;
    top: 0px;
    /*position: fixed;*/
    /*left: 109px;*/
    /*top: 80px;*/
    width: 185px;
    height: 100vh;
    overflow: auto;
    margin-right: 35px;
    background-color: #fff;
    border-radius: 8px;
    padding: 17px 0;
    box-shadow: 0 2px 16px #eef1f5;
}
.sidebar-category-list {
    padding: 0;
    margin: 0;
}
.sidebar-category-list li {
    padding: 12px 24px;
    cursor: pointer;
    color: black;
    font-weight: normal;
    /*透明样式*/
    border-left: 3px solid transparent;
}
.sidebar-category-list li a {
    display: block;
    width: 100%;
    color: black;
}
.sidebar-category-list li:hover,
.sidebar-category-list li.goods_list_active{
    color: #21A053;
    background-color: #f1f8fe;
    border-left: 3px solid #21A053;
}

/*------------右侧商品列表*/
.goods-card-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}
.goods-card-a,
.index-goods-card-a {
    display: inline-block;
    width: 235px;
    color: black;
}
.goods-card {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s;
}
/*在首页上的显示*/
.index-goods-card-list {
    gap: 17px;
}
.index-goods-card-a {
    width: 230px;
}

.goods-card:hover {
    /*使整个卡片向上移动5px*/
    transform: translateY(-5px);
}

/*商品图片设置*/
.card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.card-img img:hover {
    /*悬停图片增大1.05倍*/
    transform: scale(1.05);
}
/*商品信息*/
.card-information {
    padding: 15px;
}
.goods-title {
    margin-bottom: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
/*    溢出时用..。代表省略部分*/
    text-overflow: ellipsis;
}
/*文字信息设置*/
.goods-card span {
    margin-bottom: 10px;
}
.goods-price {
    font-size: 20px;
    color: red;
    font-weight: 700;
}
.goods-is-bargain {
    margin-left: 10px;
    padding: 2px 6px;
    background-color: #f1faee;
    color: #2a9d8f;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}


/*------------------------------------------------------------------------------商品详情界面*/
.goods-detail {
    padding: 30px;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/*左侧图片区域 */
.goods-images {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
}

/*上方大图*/
.main-image {
    width: 100%;
    /*图片比例1:1*/
    aspect-ratio: 1/1;
    /*background-color: #f0f0f0;*/
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
.main-image img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}

/*缩略图*/
.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail-images img {
    width: calc(33.333% - 7px);
    /*1:1*/
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}
.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: #21A053;
}

/*右侧信息区域*/
.goods-info-container {
    flex: 1 1 55%;
    font-size: 16px;
    font-weight: normal;
}
/*商品信息*/
.goods-info h2{
    color: #333333;
    margin-bottom: 20px;
}
.goods-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 5px;
}
.price {
    font-size: 24px;
    color: #e63946;
}
.inventory {
    color: #2a9d8f;
    font-weight: bold;
}
.is_bargain {
    color: #e76f51;
    font-weight: bold;
}

/* 卖家信息 */
.seller-info {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
}
.seller-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
}
.seller-name {
    font-weight: bold;
    color: #333;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}
.action-buttons button,
.action-buttons form {
    width: 130px;
    padding: 7px 0px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    color: #333;
}
.want-btn {
    background-color: rgba(223 196 196 );
}
.want-btn:hover {
    background-color: rgb(227, 206, 206);
}
.collect-btn {
    background-color: #e99f56;
}
.collect-btn:hover {
    background-color: #d78f49;
}



/*--------------------------------------------------------------------------------------我的收藏界面*/
.goods-cart {
    padding: 30px 25px;
    font-weight: normal;
}

/*上方全选按键*/
.top-selectAll {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}
/*选中时的input样式*/
.select-all-cbx {
    margin-right: 10px;
    accent-color: #21A053;
    width: 20px;
    height: 20px;
}
.select-all-label {
    font-size: 16px;
    color: black;
}

/*中间展示商品*/
.goods-cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #9ca4b7;
    padding: 20px 0px;
    gap: 15px;
}
/*选择框*/
.item-cbx {
    margin-right: 18px;
    accent-color: #21A053;
    transform: scale(1.4);
}
/*商品具体信息*/
.item-info {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
}
.item-img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 20px;
    /*布局不足，不收缩*/
    flex-shrink: 0;
}
.item-details {
    flex: 1;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 20px;
}
.item-name {
    margin-bottom: 8px;
    color: #222;
    font-size: 20px;
    width: 100%;
}
/*价格*/
.item-price {
    color: red;
    font-weight: bold;
    margin-left: 15px;
    margin-right: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
/* 数量选择器 */
.item-quantity{
    display: flex;
    align-items: center;
    min-width: 100px;
    margin-right: 20px;
    /*禁止选中*/
    user-select: none;
}
.btn-quantity {
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #555;
    font-size: 30px;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    transition: background .16s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-quantity {
    width: 36px;
    height: 30px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 15px;
    outline: none;
}

.btn-quantity:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/*取消收藏按键*/
.item-delete-btn {
    border: 0;
    background: none;
    color: rgba(92,81,81,.95);
    font-size: 17px;
    cursor: pointer;
    margin-left: 6px;
    padding: 9px;
    transition: color 0.2s;
    flex-shrink: 0;
}
.item-delete-btn:hover {
    color: red;
}

/*最下方的统计*/
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: #fff;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 18px 24px;
    /*显示在页面最上方*/
    z-index: 20;
}
.summary {
    font-size: 16px;
    color: #666;
    margin-right: 23px;
}
.summary strong {
    color: #222;
    font-size: 16px;
}
.summary .sum-money {
    font-size: 20px;
    color: #FF5027;
    font-weight: bold;
}
.checkout-btn {
    background-color: #21A053;
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 600;
    padding: 13px 38px;
    border-radius: 28px;
    cursor: pointer;
    transition: background 0.1s;
}
.checkout-btn:active {
    background: #178641;
}


/*---------------------------------------------------------------------------我的订单界面*/

.status-box {
    color: #fff;
    display: block;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
}
.status-yellow {
    background: #d78f49;
}
.status-green {
    background: #178641;
}
.status-done {
    background: #a59f9f;
}

.order-list,
.history-goods-publish {
    margin-top: 35px;
}
/*最上方导航栏设计*/
.tabs {
    width: 100%;
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}
.tab {
    flex: 1;
    text-align: center;
    padding: 16px 0;
}
.tab a {
    width: 100%;
    height: 100%;
    font-weight: normal;
    color: black;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.tabs-active {
    background: #21A053;
}
.tab-active {
    color: #fff !important;
    font-weight: bold !important;
}

/*下方的订单部分*/
.orders-list,
.history-goods-list {
    display: flex;
    flex-direction: column;
    gap: 24px !important;
}
.order-card,
.history-goods-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    position: relative;
}
.history-goods-card {
    flex-direction: row;
    align-items: center;
}
/*订单编号*/
.order-code {
    position: absolute;
    top: 18px;
    left: 35px;
    font-size: 13px;
    color: #aaa;
    /*调整字符之间的间距*/
    letter-spacing: 1px;
}
/*订单详情*/
.order-info{
    display: flex;
    align-items: center;
    margin-top: 24px;
}
/*商品图片*/
.product-img,
.history-goods-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 25px;
    background: #f2f2f2;
}
.history-goods-img {
    width: 100px;
    height: 100px;
}
/*商品名称*/
.product-name,
.history-goods-name {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-right: 100px;
    width: 320px;
    /*一行显示，多余部分用。。。代替*/
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-goods-name {
    width: 220px;
}
/*商品数量*/
.product-items {
    font-size: 16px;
    color: #555;
    margin-right: 100px;
    font-weight: normal;
}
/*总价*/
.product-total {
    font-size: 18px;
    color: #4e7fff;
}
/*按钮*/
.order-btn {
    display: block;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.22s;
}
.order-delete-btn {
    color: #e63946;
}
.order-acc-btn {
    color: #14854D;
}
/*-----------------------------------------------------------------------我的发布界面*/
.history-goods-info {
    display: inline-block;
    width: 400px;
    text-align: left;
    margin-right: 170px;
}
/*名称*/
.history-goods-name {
    margin-bottom: 15px;
    margin-right: 50px;
}
.history-goods-intor {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
}
/*价格*/
.history-goods-price {
    color: #ed7864;
    margin-right: 20px;
}
/*发布时间*/
.history-goods-time {
    font-weight: normal;
}

/*操作部分*/
.goods-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.btn-action {
    display: block;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.22s;
}
/*下架按键*/
.btn-down {
    margin-right: 30px;
    background-color: #f0ad4e;
}
/*删除按键*/
.btn-delete {
    background-color: #d9534f;
}
/*已经下架按键*/
.btn-off {
    background-color: #aaa;
    margin-right: 30px;
    cursor: not-allowed;
}